package orm;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy; 
import javax.jdo.annotations.IdentityType; 
import javax.jdo.annotations.PersistenceCapable; 
import javax.jdo.annotations.Persistent; 
import javax.jdo.annotations.PrimaryKey; 

@PersistenceCapable(identityType = IdentityType.APPLICATION) 
public class BaseIdObject {
    @PrimaryKey 
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) 
    protected Long id; 

    @Persistent
    protected Date gmtCreate;
    
    @Persistent
    protected Date gmtModified;

    protected BaseIdObject() {
    	this.gmtCreate = new Date();
    	this.gmtModified = new Date();
    }
    
	public Long getId() {
		return id;
	}

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public Date getGmtModified() {
		return gmtModified;
	}

	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}
}
